<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFeedbackAppealsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('feedback_appeals', function (Blueprint $table) {
            $table->increments('id')->comment('诉求建议表');
            $table->integer('user_id')->nullable()->comment('用户id')->default(0);
            $table->tinyInteger('type')->nullable()->comment('诉求类型;投诉反馈1、BUG反馈2、功能建议3')->default(0);
            $table->text('content')->nullable()->comment('诉求内容');
            $table->string('contact', 64)->nullable()->comment('手机号或邮箱');
            $table->text('imgs')->nullable()->comment('图片');
            $table->tinyInteger('status')->nullable()->comment('状态;未处理0、处理中1、已处理2')->default(0);
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('feedback_appeals');
    }
}
